//
//  ZSLRScrollView.h
//  CheFu365
//
//  Created by safiri on 2017/12/14.
//  Copyright © 2017年 safiri. All rights reserved.
//


#import "ZSMasonryScrollView.h"

NS_ASSUME_NONNULL_BEGIN
@class ZSLRPageScrollView;
@protocol ZSLRPageScrollViewDelegate <NSObject>


/**
 ZSLRPageScrollView滑动到某一页时回调

 @param scrollView ZSLRPageScrollView
 @param page 页数
 */
- (void)lrPageScrollView:(ZSLRPageScrollView *)scrollView changePage:(NSInteger)page;

/**
 ZSLRPageScrollView滑动系数回调

 @param scrollView ZSLRPageScrollView
 @param ratio 滑动系数
 */
- (void)lrPageScrollView:(ZSLRPageScrollView *)scrollView scrollRatio:(CGFloat)ratio;

@end


/**
  左右滑动页ScrollView
 */
@interface ZSLRPageScrollView : ZSMasonryScrollView

/**
 滑动到指定页

 @param page 0代表第一页
 @param animated 是否动画滑动
 */
- (void)scrollToPage:(NSInteger)page animated:(BOOL)animated completion:(void (^ __nullable)(BOOL finished))completion;

@property (nonatomic ,weak ,nullable) id <ZSLRPageScrollViewDelegate>lrPageScrollViewDelegate;

/**
 当前页
 */
@property (nonatomic ,assign ,readonly) NSInteger currentPage;

/**
 移动系数
 */
@property (nonatomic ,assign ,readonly) CGFloat scrollRatio;

/**
 是否禁用手势滑动  默认NO不禁用
 */
@property (nonatomic ,assign) BOOL forbiddenScrollEnabled;

@end
NS_ASSUME_NONNULL_END
